Inject same env variables when building container and exec command#40
Inject same env variables when building container and exec command#40tcollignon wants to merge 1 commit intojenkinsci:masterfrom
Conversation
|
Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests. |
|
The intent on rebuilding |
|
Thank you for your answer. |
|
yes, letting Jenkins component inject environment variable but keeping isolation from host executor is not trivial. Using a whitelist would just be a crappy workaround, I'm looking at a global fix |
|
ok thank you for keeping that problem in mind, if I can help, tell me |
|
I'm being affected by this issue too. My build job runs the following docker exec command: docker exec --tty 875fb3f6e0d2f807ee686a45cd7ca454b3e2d21267e69f4904dfc47ee4e4f36a env Note the parts in Bold are conflicting - why is the plugin setting $HOME variable to /root |
Hi
Like it said in https://issues.jenkins-ci.org/browse/JENKINS-32393, the injection of environment variables like JAVA_HOME or PATH in the container making trouble, and are not IMO in the feeling of the container way.
Moreover, I see that you have still changed this when the container start here : 79e47f5
I think this is the same when executing each command.
This PR do that.
But maybe you will think that add get/set in BuiltInContainer.java is not the right way to do that, so it's the "facility way", I can change this if you have a better implementation in mind (I'm pretty sure of that).